#ifndef __I2C0_H__
#define __I2C0_H__

#include "ADuCM4050.h"
#include "GPIO.h"
#include "DELAY.h"

#define I2C_SDA P0_O(5)
#define I2C_SCL P0_O(4)
#define READ_SDA P0_I(5)

void SDA_OUT(void);
void SDA_IN(void);
void I2C_Start(void);
void I2C_Stop(void);
uint8_t I2C_Wait_Ack(void);
void I2C_Ack(void);
void I2C_No_Ack(void);
void I2C_Send_Byte(uint8_t txd);
uint8_t I2C_Read_Byte(void);

void TMP75_WriteOneByte(uint8_t DeviceAdd,uint8_t PointAddr,uint8_t DataToWrite);
void TMP75_WriteOneWord(uint8_t DeviceAdd,uint8_t PointAddr,uint16_t DataToWrit);
uint8_t TMP75_ReadOneByte(uint8_t DeviceAdd, uint8_t PointAddr);
uint16_t TMP75_ReadOneWord(uint8_t DeviceAdd, uint8_t PointAddr);

#endif
